package com.service.data;

import com.common.ErrorCodeEnum;
import com.common.emums.DataStatus;
import com.common.exception.BusinessException;
import com.common.utils.StringUtils;
import com.core.springSecurity.common.SecurityUtils;

import com.dao.primary.data.DataObdGpsInfoMapper;
import com.model.domain.data.GetDataObdGpsInfoDO;
import com.model.pojo.data.DataObdGpsInfo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import com.github.pagehelper.PageHelper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;



/**
 * @Author: zql
 * @Description: 统计OBD设备相关信息服务
 * @Data: 2023-10-27
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class DataObdGpsInfoService {
    private final DataObdGpsInfoMapper dataObdGpsInfoMapper;

    public List<DataObdGpsInfo> getAllList(GetDataObdGpsInfoDO getDataObdGpsInfoDO){
        PageHelper.clearPage();
        PageHelper.orderBy(getDataObdGpsInfoDO.getSortRow()+getDataObdGpsInfoDO.getSortOrder());
        return dataObdGpsInfoMapper.selectList(getDataObdGpsInfoDO);
    }

    public void updateList(List<DataObdGpsInfo> list){
        dataObdGpsInfoMapper.updateListSelective(list);
    }
}
